#include <linux/fs.h>

int zds_user_read(const char *f_path, char *buf, int buf_len){
	int rbytes;
	struct file *file;

	file = filp_open(f_path, O_RDONLY, 0);
	if(IS_ERR(file)){
		printk("%s open failed\n", f_path);	
		return -EINVAL;
	}

	rbytes = kernel_read(file, buf, buf_len - 1, &file->f_pos);
	
	filp_close(file, NULL);
	return rbytes;
}
